package cn.edu.cug.cs.gtl.oi.ui.menu;

import javax.swing.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;

public class JMenuShow extends JMenu {
    public JMenuShow() {
        this.setText("显示(V)");
        this.setMnemonic(KeyEvent.VK_V);
        init();
    }

    void init() {
        JMenuItem ItemRefresh = new JMenuItem("刷新");
        ItemRefresh.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0));
        this.add(ItemRefresh);
        this.addSeparator();

        JMenuItem ItemFullScreenDisplay = new JMenuItem("全屏显示(F)");
        ItemFullScreenDisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F9, InputEvent.ALT_DOWN_MASK));
        this.add(ItemFullScreenDisplay);
        this.addSeparator();

        JMenuItem ItemRotateView = new JMenuItem("旋转视图");
        ItemRotateView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, 0));
        this.add(ItemRotateView);

        JMenuItem ItemLocateRotation = new JMenuItem("定位旋转");
        ItemLocateRotation.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, 0));
        this.add(ItemLocateRotation);

        JMenuItem ItemTransView = new JMenuItem("平移视图");
        ItemTransView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, 0));
        this.add(ItemTransView);
        this.addSeparator();

        JMenu MenuViewShow = new JMenu("视图显示");

        JMenuItem ItemReset = new JMenuItem("复位");
        ItemReset.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_0, 0));
        MenuViewShow.add(ItemReset);
        MenuViewShow.addSeparator();

        JMenuItem ItemVerticalView = new JMenuItem("俯视图");
        ItemVerticalView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, 0));
        MenuViewShow.add(ItemVerticalView);

        JMenuItem ItemBottomView = new JMenuItem("底视图");
        ItemBottomView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_2, 0));
        MenuViewShow.add(ItemBottomView);

        JMenuItem ItemFrontView = new JMenuItem("正视图");
        ItemFrontView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_3, 0));
        MenuViewShow.add(ItemFrontView);

        JMenuItem ItemRearView = new JMenuItem("后视图");
        ItemRearView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_4, 0));
        MenuViewShow.add(ItemRearView);

        JMenuItem ItemRightView = new JMenuItem("右视图");
        ItemRightView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_5, 0));
        MenuViewShow.add(ItemRightView);

        JMenuItem ItemLeftView = new JMenuItem("左视图");
        ItemLeftView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_6, 0));
        MenuViewShow.add(ItemLeftView);

        JMenuItem ItemUserCustomAngle = new JMenuItem("用户自定义角度");
        MenuViewShow.add(ItemUserCustomAngle);
        MenuViewShow.addSeparator();

        JRadioButtonMenuItem ItemPerspectiveProject = new JRadioButtonMenuItem("透视投影");
        MenuViewShow.add(ItemPerspectiveProject);

        JRadioButtonMenuItem ItemOrthographicProjection = new JRadioButtonMenuItem("正射投影");
        MenuViewShow.add(ItemOrthographicProjection);
        MenuViewShow.addSeparator();

        JRadioButtonMenuItem ItemThreeViewDisplay = new JRadioButtonMenuItem("三视图显示");
        MenuViewShow.add(ItemThreeViewDisplay);

        this.add(MenuViewShow);

        JMenu MenuLockCoordinateAxis = new JMenu("锁定坐标轴");

        JRadioButtonMenuItem ItemNotLock = new JRadioButtonMenuItem("不锁定");
        MenuLockCoordinateAxis.add(ItemNotLock);
        MenuLockCoordinateAxis.addSeparator();

        JRadioButtonMenuItem ItemLockXAxis = new JRadioButtonMenuItem("锁定X轴");
        MenuLockCoordinateAxis.add(ItemLockXAxis);

        JRadioButtonMenuItem ItemLockYAxis = new JRadioButtonMenuItem("锁定Y轴");
        MenuLockCoordinateAxis.add(ItemLockYAxis);

        JRadioButtonMenuItem ItemLockZAxis = new JRadioButtonMenuItem("锁定Z轴");
        MenuLockCoordinateAxis.add(ItemLockZAxis);

        this.add(MenuLockCoordinateAxis);
        this.addSeparator();

        JMenuItem ItemRouteRoam = new JMenuItem("路线漫游");
        ItemRouteRoam.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_DOWN_MASK));
        this.add(ItemRouteRoam);

        JMenuItem ItemSuspendRoam = new JMenuItem("暂停漫游");
        this.add(ItemSuspendRoam);

        JMenuItem ItemStopRoam = new JMenuItem("停止漫游");
        ItemStopRoam.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK));
        this.add(ItemStopRoam);

        JMenuItem ItemRoamRecord = new JMenuItem("漫游录像");
        this.add(ItemRoamRecord);
        this.addSeparator();

        JMenuItem ItemLineKeyboardRoam = new JMenuItem("路径键盘漫游");
        this.add(ItemLineKeyboardRoam);
        this.addSeparator();

        JMenuItem ItemPointRoam = new JMenuItem("定点漫游");
        this.add(ItemPointRoam);

        JMenuItem ItemFreeRoam = new JMenuItem("自由漫游");
        this.add(ItemFreeRoam);
        this.addSeparator();

        JMenuItem ItemCreateOrChangeLegend = new JMenuItem("创建/修改图例");
        this.add(ItemCreateOrChangeLegend);

        JMenuItem ItemExportLegend = new JMenuItem("导出图例");
        this.add(ItemExportLegend);

        JMenuItem ItemLoadLegend = new JMenuItem("加载图例");
        this.add(ItemLoadLegend);
        this.addSeparator();

        JMenuItem ItemMoveLight = new JMenuItem("移动光源");
        this.add(ItemMoveLight);

        JMenuItem ItemSystemLightManager = new JMenuItem("系统光源管理");
        this.add(ItemSystemLightManager);

        JMenuItem ItemChangeSystemMaterial = new JMenuItem("更换系统材质");
        this.add(ItemChangeSystemMaterial);
        this.addSeparator();

        JMenuItem ItemSeparateLayerSetColor = new JMenuItem("分层设色");
        ItemSeparateLayerSetColor.setEnabled(false);
        this.add(ItemSeparateLayerSetColor);

        JMenuItem ItemShowStyle = new JMenuItem("显示风格");
        this.add(ItemShowStyle);
    }
}
